#include "opencv2/opencv.hpp"
using namespace cv;
int main(void)
{
	const char *fn = "F:\\opencv4.0\\opencv\\sources\\samples\\data\\lena.jpg";
	Mat image1 = imread(fn);
	imshow("Hello world", image1);
	waitKey(0);
	Mat image, gray, hsv,rgb, hsvChannels[3],rgbChannels[3];
	cvtColor(image1, rgb, COLOR_BGR2RGB);
	split(rgb, rgbChannels);
	imshow("R", rgbChannels[0]);
	imshow("G", rgbChannels[1]);
	imshow("B", rgbChannels[2]);
	waitKey(0);
	pyrDown(image1, image);
	cvtColor(image, gray, COLOR_BGR2GRAY);
	imshow("source image", image);
	imshow("gray", gray);
	waitKey(0);

	cvtColor(image, hsv, COLOR_BGR2HSV);
	split(hsv, hsvChannels);
	imshow("Hue", hsvChannels[0]);
	imshow("Saturation", hsvChannels[1]);
	imshow("Value", hsvChannels[2]);

	waitKey(0);



}